package com.lvhaosb.newpneumonia.web.controller;

import com.lvhaosb.newpneumonia.POJO.vo.DomesticEpidemicInfo;
import com.lvhaosb.newpneumonia.POJO.vo.Result;
import com.lvhaosb.newpneumonia.service.DomesticEpidemicService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 国内疫情 前端控制器
 *
 * @author lvhao
 * @since 2020-06-21
 */
@CrossOrigin
@RestController
@RequestMapping("/domestic_epidemic")
public class DomesticEpidemicController {
    @Autowired
    private DomesticEpidemicService domesticEpidemicService;

    @GetMapping("/new_info")
    public Result getNewInfo(){
        DomesticEpidemicInfo domesticEpidemicInfo = domesticEpidemicService.queryDomesticEpidemicInfo();
        return new Result(200,"请求成功",domesticEpidemicInfo);
    }
}

